package com.xujie.sportsmeeting.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xujie.sportsmeeting.dto.JudgeQueryDTO;
import com.xujie.sportsmeeting.entity.Judge;

/**
 * 裁判员服务接口
 */
public interface JudgeService extends IService<Judge> {

    /**
     * 分页查询裁判员
     */
    IPage<Judge> getJudgePage(IPage<Judge> page, JudgeQueryDTO queryDTO);

    /**
     * 创建裁判员
     */
    boolean createJudge(Judge judge);

    /**
     * 更新裁判员
     */
    boolean updateJudge(Judge judge);

    /**
     * 更新裁判员状态
     */
    boolean updateJudgeStatus(Long id, Integer status);

    /**
     * 根据工号查询裁判员
     */
    Judge findByWorkNumber(String workNumber);

    /**
     * 根据用户ID查询裁判员
     */
    Judge findByUserId(Long userId);

    /**
     * 检查工号是否存在
     */
    boolean existsByWorkNumber(String workNumber);
}
